import sympy as sp
import math

x_str=input()

x_in=float(input())

def fun(e):
    return math.exp(e*e-1)

global x_lst
global y_lst

x_lst=x_str.split(' ')
x_lst=[float(x) for x in x_lst]
y_lst=[fun(e) for e in x_lst]

x = sp.symbols('x')

def cal(k,end=' '):
    global x_lst
    global y_lst
    global x

    ans = 0
    for j in range(0,k+1):
        tem=1
        for i in range(0,k+1):
            #print("i=%d"%i)
            if i==j:
                continue
            tem*=x-x_lst[i]
            tem/=x_lst[j]-x_lst[i]
        tem*=y_lst[j]
        ans+=tem
    print("%.4f"%ans,end=end)


